#include <cstdio>
#include <algorithm>
#include <cmath>
#define eps 1e-8

int cnt, pre, behind; // 记录当前这一层的油桶
struct Point
{
    double x, y;
    Point(double x = 0, double y = 0) : x(x), y(y) {}
} C[60];

Point operator+(Point A, Point B)
{
    return Point(A.x + B.x, A.y + B.y);
}

double Dis(Point a, Point b)
{
    return sqrt((b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y));
}

Point Rotate(Point A, double rad)
{
    return Point(A.x * cos(rad) - A.y * sin(rad), A.x * sin(rad) + A.y * cos(rad));
}

void Caculate(Point a, Point b)
{
    double dis = Dis(a, b);
    double ang = acos(dis / 4);
    Point t;
    t.x = 2 / dis * (b.x - a.x);
    t.y = 2 / dis * (b.y - a.y);
    C[cnt] = a + Rotate(t, ang);
    cnt++;
}

void Solve()
{
    for (int i = pre + 1; i <= behind; i++)
        Caculate(C[i - 1], C[i]);
    pre = behind + 1; // pre 和behind移动到上面的一层
    behind = cnt - 1;
}

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
#endif // LOCAL
    int T;
    scanf("%d", &T);
    for (int t = 1; t <= T; t++)
    {
        int n;
        scanf("%d", &n);
        for (int i = 0; i < n; i++)
        {
            scanf("%lf", &C[i].x);
            C[i].y = 1.0;
        }
        cnt = n;
        pre = 0;
        behind = cnt - 1;
        while ((behind - pre) != 0)
            Solve();
        printf("%d: %.4f %.4f\n", t, C[pre].x, C[pre].y);
    }
    return 0;
}